This method calculates the Chaikin A/D Oscillator.
var ADOSC(fastPeriod, slowPeriod, highPricesArray, lowPricesArray, closePricesArray, volumeArray, calculatedDataArray);
fastPeriod
Fast period integer value.
slowPeriod
Slow period integer value.
highPricesArray
Array object filled with high prices.
lowPricesArray
Array object filled with low prices.
closePricesArray
Array object filled with close prices.
volumeArray
Array object filled with volume prices.
calculatedDataArray
Empty Array object that will be filled with calculated data.
Returns true if calculation was completed successfully, or false otherwise.
The following example demonstrates how to use ADOSC method.
function calculate(beginIndex, endIndex)
{
var fastPeriod = 15;
var slowPeriod = 5;
var highPricesArray = new Array();
var lowPricesArray = new Array();
var closePricesArray = new Array();
var volumeArray = new Array();
//populate arrays..
..
..
..
var calculatedDataArray = new Array();
var rc = TechnicalAnalysis.ADOSC(fastPeriod, slowPeriod, highPricesArray, lowPricesArray,
closePricesArray, volumeArray, calculatedDataArray);
}
Copyright © 2006-2009 ActiveTick LLC